package cn.gson.fengboot.controller;

import cn.gson.fengboot.model.pojos.Ljianche;
import cn.gson.fengboot.model.service.LjiancheService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("/vue")
public class LjiancheController {

    @Autowired
    LjiancheService ljiancheService;

    //查询
    @RequestMapping("/jianchecx")
    @ResponseBody
    public List<Ljianche> jianchecx(Integer jcbid){
        return ljiancheService.jianchecx(jcbid);
    }

    //新增
    @RequestMapping("/addjianche")
    @ResponseBody
    public  void addjianche(@RequestBody Ljianche ljianche){
        ljiancheService.addjianche(ljianche);
    }
}
